home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / umich / falcon / programm.ing / nt_dsp1.lzh / NT_DSP1.MSA / LFLTS / LATNRMT.ASM < prev   
Assembly Source File  |  1989-01-24  |  2KB  |  51 lines

  1. ;
  2. ; This program originally available on the Motorola DSP bulletin board.
  3. ; It is provided under a DISCLAMER OF WARRANTY available from
  4. ; Motorola DSP Operation, 6501 Wm. Cannon Drive W., Austin, Tx., 78735.
  5. ; Normalized Lattice IIR Filter Macro. (test program)
  6. ; Last Update 01 Aug 86   Version 1.0
  7. ;
  8. ;
  9. ;       normalized lattice test program
  10. ;
  11.         opt     cex
  12.         page    132,66,0,10
  13.         nolist
  14.         include 'dsplib:ioequ'
  15.         list
  16.         include 'dsplib:latnrm'
  17.  
  18. order   equ     3               ;three coefficient lattice
  19. datin   equ     $ffff           ;location in y memory of input file
  20. datout  equ     $fffe           ;location in y memory of output file
  21. npts    equ     20              ;number of points to process
  22.  
  23.         org     x:0
  24. ;       note: the following coefficients were used for testing
  25. ;       purposes only and do not follow the relationship q=sqrt(1-k**2)
  26. ;       as described by Markel
  27. ;
  28. cadd    dc      .9,.8,.7,.6,.3,.2       ;q1,k1,q2,k2...
  29.         dc      .1,.2,.3,.4             ;v's
  30.         org     y:0
  31. state   ds      10              ;filter states
  32.  
  33.         org     p:$100
  34. start
  35.         movep   #0,x:M_BCR      ;no wait states on external io
  36.  
  37.         move    #cadd,r0        ;point to k's
  38.         move    #3*order,m0     ;mod order
  39.         move    #state,r4       ;point to first state
  40.         move    #order,m4       ;mod order
  41.  
  42.         do      #npts,_endp
  43.  
  44.         move    y:datin,y0      ;get input sample
  45.         latnrm  order           ;do normalized lattice
  46.         move    a,y:datout      ;output filtered sample
  47. _endp
  48.         end
  49.